home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / castools.zip / FUNC6H.ASM < prev    next >
Assembly Source File  |  1989-08-10  |  1KB  |  40 lines

  1. Include multi.inc
  2. Include model.inc
  3.  
  4. ;==============================================================================
  5. ;
  6. ;   CAS function 06h -- Find Next Entry in Queue
  7. ;   
  8. ;   Format:
  9. ;               int CASFindNext (BYTE queue)
  10. ;   Input:
  11. ;               queue to search
  12. ;   Output:
  13. ;               Returns event handle or negative error code
  14. ;==============================================================================
  15.  
  16.                 .CODE
  17. CASFindNext    PROC    arg1:BYTE 
  18.  
  19.                 push    bx              ; save registers
  20.                 push    dx              
  21.                 
  22.                 mov     ax,MUX          ; load multiplex number
  23.                 mov     ah,al           ; move into ah
  24.                 mov     al,06h          ; CAS function 6
  25.                 mov     dl,arg1         ; direction to search
  26.                 int     2Fh
  27.  
  28.                 cmp     ax,0            ; ax = 0?
  29.                 jne     FINISH          ; find first failed, return err. code
  30.                 mov     ax,bx           ; move event handle to ax
  31. FINISH:         
  32.                 pop     dx              ; restore registers
  33.                 pop     bx                 
  34.                 ret
  35. CASFindNext    endp
  36.      
  37.                 END
  38.                 
  39.  
  40.